package com.glsc.ngateway.common.base.repo.mysql.gateway.platform;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.gitee.IssueBase;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author xuchang
 */
@Repository
public interface IssueBaseRepo extends JpaRepository<IssueBase, Long>, JpaSpecificationExecutor<IssueBase> {

    @Transactional
    @Modifying
    @Query(value = "truncate table t_gw_gitee_issue_base", nativeQuery = true)
    void truncate();
}
